<template>
  <el-tree-select
      v-model="props.MenuList.value.menuName"
      :data="props.MenuList.menuList"
      check-strictly
      :props="propsf"
      :render-after-expand="false"
      @node-click="selectMenu"
      :value-key="props.MenuList.value.id"
      highlight-current
      node-key="id"
      ref="treef"
  />

</template>

<script lang="ts" setup>
import {defineProps, reactive, ref} from 'vue'
const props =defineProps ({
  MenuList: {
    type: Object,
  },
  MenuData:{
    type: Object,
  }
});
const eliminatef =()=>{
}

const propsf = {
  label: 'menuName',
  children: 'menuList',
}
const menuId= ()=>{
 return props.MenuList.value.id;
}
const selectMenu =(val)=>{
  props.MenuList.value.id =val.id
}
const treef = ref();
const gaoliang = (id)=>{
  treef.value.setCurrentKey(id)
}
defineExpose({ menuId,eliminatef,gaoliang})

</script>
